﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>请单击选择</title>

    <script type="text/javascript">
   
    function $() {
        var elements = new Array();
        for (var i = 0; i < arguments.length; i++) {
            var element = arguments[i];
            if (typeof element == 'string')
                element = document.getElementById(element);
            if (arguments.length == 1)
                return element;
            elements.push(element);
        }
        return elements;
    }
    if (typeof Utility == 'undefined')  
    {  
      var Utility = {};  
    }  
    Utility.URLParser = function(url) {  

        this._fields = {  
            'Username' : 4,   
            'Password' : 5,   
            'Port' : 7,   
            'Protocol' : 2,   
            'Host' : 6,   
            'Pathname' : 8,   
            'URL' : 0,   
            'Querystring' : 9,   
            'Fragment' : 10  
        };  

        this._values = {};  
        this._regex = null;  
        this.version = 0.1;  
        this._regex = /^((\w+):\/\/)?((\w+):?(\w+)?@)?([^\/\?:]+):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(\w*)/;  
        for(var f in this._fields)  
        {  
            this['get' + f] = this._makeGetter(f);  
        }  

        if (typeof url != 'undefined')  
        {  
            this._parse(url);  
        }  
    }  
    Utility.URLParser.prototype.setURL = function(url) {  
        this._parse(url);  
    }  

    Utility.URLParser.prototype._initValues = function() {  
        for(var f in this._fields)  
        {  
            this._values[f] = '';  
        }  
    }  

    Utility.URLParser.prototype._parse = function(url) {  
        this._initValues();  
        var r = this._regex.exec(url);  
        if (!r) throw "DPURLParser::_parse -> Invalid URL";  

        for(var f in this._fields) if (typeof r[this._fields[f]] != 'undefined')  
        {  
            this._values[f] = r[this._fields[f]];  
        }  
    }  
    Utility.URLParser.prototype._makeGetter = function(field) {  
        return function() {  
            return this._values[field];  
        }  
    }      
    Utility.URLParser.prototype.getUrlParam = function(name){  
          var   reg   =   new   RegExp("(^|&)"+   name   +"=([^&]*)(&|$)");          
          var   r   =   this.getQuerystring().match(reg);   
          if   (r!=null)   return   unescape(r[2]);   return   null;   
    } 
    var CurrentUrl=new Utility.URLParser(window.location);

    </script>

    <script type="text/javascript">
    function iload(){
        var ifrm = $("frm");
        if(ifrm){
            var w=CurrentUrl.getUrlParam("width")||CurrentUrl.getUrlParam("w");
            var h=CurrentUrl.getUrlParam("height")||CurrentUrl.getUrlParam("h");
            if(w)
                ifrm.width=w;
             
            if(h)
                ifrm.height=h;     
                
            var isrc = CurrentUrl.getUrlParam("source")||CurrentUrl.getUrlParam("Source");
            if(isrc)
                ifrm.src=isrc+"&st="+ new Date();
        }       
    }
        
    </script>

    <script type="text/javascript">
        function conditionSel(){   
            if(dialogArguments)
            {    
                dialogArguments.returnAction.apply(arguments);
              //  dialogArguments.returnAction.apply(conditionSel,arguments);
               // dialogArguments.returnAction();
                window.close();                
            }
            else{
               window.opener.returnAction(arguments);    
               top.close();       
            }
        }
    </script>

</head>
<body style="margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;" onload="iload()"
    onresize="iload()">
    <iframe id="frm" src="SomeSel.aspx" onload="this.height=document.body.scrollHeight"
        width="100%" height="100%" style="border-bottom-width: 0px;"></iframe>
</body>
</html>
